#!/bin/bash
echo "=== 纯净环境构建 UEStudio ==="

# 检查环境
echo "当前shell: $SHELL"
echo "Make版本:"
make --version
echo "GCC版本:"
gcc --version

# 清理
echo "清理构建目录..."
rm -rf build
mkdir build
cd build

# 配置
echo "配置CMake..."
cmake .. -G "Unix Makefiles"

# 编译
echo "开始编译..."
make -j4

if [ $? -eq 0 ]; then
    echo "🎉 UEStudio 构建成功!"
    echo "可执行文件位置:"
    find . -name "uestudio*" -type f
else
    echo "❌ 构建失败"
fi
